package cn.qayy.service;

import com.github.pagehelper.PageInfo;

import cn.qayy.po.Basis;
import cn.qayy.po.Plan;
import cn.qayy.po.Register;

import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/***
 * 注册库 接口
 * @author jobs1127
 *
 */
public interface IRegisterService extends BasicService{
    PageInfo<Map<String, Object>> selectRegisterBy(Map<String, Object> params) throws Exception;

    List<Map<String,String>> selectCommercialSourceAuto() throws Exception;
    /**
     * 通过id查询注册库
     * @param params
     * @return
     */
    Register selectRegisterByID(@RequestParam Integer planId) throws Exception;

    /***
	 * 查询注册库，获取所有的甲方、乙方
	 * @return
	 */
	List<Map<String, String>> selectAllJiafanAndYifan() throws Exception;

	/***
	 * 通过一些入货乙方获取注册库
	 * @param params
	 * @return
	 * @throws Exception
	 */
	List<Register> selectJiafanAndYifanByNames(Map<String,Object> params) throws Exception;
	/**
	 * 查询所有入货乙方对应的省份
	 * @return
	 */
	List<Register> selectAllProvince2Names();
	/***
	 * 查询注册库
	 * @param params
	 * @return
	 */
	List<Register> selectByMap(Map<String, Object> params) throws Exception;
	/***
	 * 查询id
	 * @param params
	 * @return
	 */
	List<Integer> selectIdsByMap(Map<String, Object> params);

	PageInfo<Register> selectForList(Map<String, Object> params);

	/**
	 * 持久化
	 * @param map
	 * @param request
	 * @param response
	 * @throws Exception 
	 */
	void persistence(Map<String, List<Uploadable>> map, HttpServletRequest request, HttpServletResponse response) throws Exception;

}
